"use strict";
cc._RF.push(module, '46cd1pyXLxAa68Ng4rfcD4L', 'socreShow');
// Script/socreShow.js

"use strict";

var _NumberView = require("./NumberView");

var _NumberView2 = _interopRequireDefault(_NumberView);

var _allVariable = require("./allVariable");

var _allVariable2 = _interopRequireDefault(_allVariable);

var _PlatformUtil = require("./PlatformUtil");

var _PlatformUtil2 = _interopRequireDefault(_PlatformUtil);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

cc.Class({
   extends: cc.Component,

   properties: {

      numberCompontent: _NumberView2.default,
      chargeBtn: cc.Node,
      shopBtn: cc.Node,
      shopScrollView: cc.Node,
      backBtn: cc.Button,
      exitView: cc.Node,
      exitClosebtn: cc.Node,
      closeBtn: cc.Button,
      thinkBtn: cc.Button,
      cancleBtn: cc.Button

   },

   onLoad: function onLoad() {},


   closeExit: function closeExit() {

      var changebig = cc.scaleTo(0.02, 1.2);

      var that = this;
      var finish = cc.callFunc(function () {

         var changesmail = cc.scaleTo(0.08, 1.0);

         var smaillfinish = cc.callFunc(function () {

            that.exitView.active = false;
         });

         var seq2 = cc.sequence(changesmail, smaillfinish);
         this.closeBtn.node.runAction(seq2);
      }, this);

      var seq = cc.sequence(changebig, finish);

      this.closeBtn.node.runAction(seq);
   },

   canCle: function canCle() {

      var changebig = cc.scaleTo(0.2, 1.1);

      var that = this;
      var finish = cc.callFunc(function () {

         var changesmail = cc.scaleTo(0.1, 1.0);

         var smaillfinish = cc.callFunc(function () {

            that.exitView.active = false;
         });

         var seq2 = cc.sequence(changesmail, smaillfinish);
         this.cancleBtn.node.runAction(seq2);
      }, this);

      var seq = cc.sequence(changebig, finish);

      this.cancleBtn.node.runAction(seq);
   },

   sureExit: function sureExit() {

      var changebig = cc.scaleTo(0.2, 1.1);

      var finish = cc.callFunc(function () {

         var changesmail = cc.scaleTo(0.1, 1.0);

         var smaillfinish = cc.callFunc(function () {

            cc.director.loadScene("StartGame");
         });

         var seq2 = cc.sequence(changesmail, smaillfinish);
         this.thinkBtn.node.runAction(seq2);
      }, this);

      var seq = cc.sequence(changebig, finish);

      this.thinkBtn.node.runAction(seq);
   },

   backmainClick: function backmainClick() {

      var changebig = cc.scaleTo(0.2, 1.1);

      var finish = cc.callFunc(function () {

         var that = this;
         var changesmail = cc.scaleTo(0.1, 1.0);

         var smaillfinish = cc.callFunc(function () {

            if (_allVariable2.default.isPlaying) {

               console.log("正在游戏当中");
               that.exitView.active = true;
            } else {

               cc.director.loadScene("StartGame");
            }
         });

         var seq2 = cc.sequence(changesmail, smaillfinish);
         this.backBtn.node.runAction(seq2);
      }, this);

      var seq = cc.sequence(changebig, finish);

      this.backBtn.node.runAction(seq);
   },

   rechargeClick: function rechargeClick() {

      var changebig2 = cc.scaleTo(0.2, 1.1);

      var finish = cc.callFunc(function () {

         var changesmail2 = cc.scaleTo(0.1, 1.0);
         this.chargeBtn.runAction(changesmail2);
      }, this);

      var seq = cc.sequence(changebig2, finish);

      this.chargeBtn.runAction(seq);

      console.log("去充值");

      _PlatformUtil2.default.platform.exchangeStar();
   },

   gotoShopClick: function gotoShopClick() {

      console.log("进入商城");

      var changebig2 = cc.scaleTo(0.2, 1.1);

      var finish = cc.callFunc(function () {

         var changesmail2 = cc.scaleTo(0.1, 1.0);
         this.shopBtn.runAction(changesmail2);
         this.shopScrollView.active = true;
      }, this);

      var seq = cc.sequence(changebig2, finish);

      this.shopBtn.runAction(seq);
   },

   addCoinStarNumber: function addCoinStarNumber() {

      _allVariable2.default.starNumber = _allVariable2.default.starNumber + 1;

      this.numberCompontent.setText(_allVariable2.default.starNumber);
   },

   addMoreCoinStarNumber: function addMoreCoinStarNumber() {

      _allVariable2.default.starNumber = _allVariable2.default.starNumber + 2;

      this.numberCompontent.setText(_allVariable2.default.starNumber);
   },

   minusStarNumber: function minusStarNumber() {

      _allVariable2.default.starNumber = _allVariable2.default.starNumber - 10;
      this.numberCompontent.setText(_allVariable2.default.starNumber);
   },

   start: function start() {}
}

// update (dt) {},
);

cc._RF.pop();